<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Title</title>
    <script src="../js/vue.js"></script>
</head>

<body>
    <div id="app">
        <!-- 如果函数有形参，使用的时候没有传递实参，浏览器会将浏览器默认的event对象传入， -->
        <!-- 在调用方法时，手动获取到浏览器参数的event对象,$event -->
        <button @click="btnClick()">按钮1</button>
        <button @click="btnClick1(123,$event)">按钮2</button>
        <button>按钮3</button>
        <button>按钮4</button>
        <button>按钮5</button>
    </div>

    <script>
        var vm = new Vue({
            el: '#app',
            data: {
                message: '我是你爹!'
            },
            methods: {
                btnClick: function(event) {
                    console.log("点击了第" + "个按钮" + event);
                },
                btnClick1: function(a, event) {
                    console.log(a);
                    console.log(event);
                }
            }
        });
    </script>
</body>

</html>